package cz.cvut.kadledav.paa.knapsack.tasks;

import cz.cvut.kadledav.paa.knapsack.bo.Item;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * User: David Kadlecek
 * Date: 2.10.13
 * Time: 22:13
 */
public abstract class ATask {

    protected int maxAllowedWeight;
    protected int maxPrice;

    public abstract void setItems(List<Item> items);

    public void setMaxAllowedWeight(int weight){
        this.maxAllowedWeight = weight;
    }


    public abstract void compute();

    public abstract Set<Integer> getComputedItemsIds();

    public int getMaximumPrice() {
        return maxPrice;
    }

    public void initialize(ArrayList<Item> items, Map<String,Object> params){
        //for processing specific params must method must this be overridden
        setItems(items);
    }
}
